<?php

use App\Http\Controllers\Stock\AdminController;
use App\Http\Controllers\Stock\Controller;
use App\Http\Controllers\Stock\Manage\SourceController;
use App\Http\Controllers\Stock\Manage\HighseaController;
use App\Http\Controllers\Stock\Manage\PrivateseaController;
use Illuminate\Support\Facades\Route;

Route::prefix('admin')->group(function(){
    Route::post('login',[AdminController::class,'login']);
    Route::post('bind',[AdminController::class,'bind']);
});

Route::prefix('admin')->middleware('AdminAuth')->group(function(){
    Route::post('unbinding',[AdminController::class,'unbinding']);
    Route::post('avatar',[AdminController::class,'avatar']);
    Route::post('profile',[AdminController::class,'profile']);
});

Route::prefix('manage')->middleware('AdminAuth')->group(function(){
    Route::post('source/index',[SourceController::class,'index']);
    Route::post('source/add',[SourceController::class,'add']);
    Route::post('source/del',[SourceController::class,'del']);
    Route::post('source/edit',[SourceController::class,'edit']);
    Route::post('source/name',[SourceController::class,'name']);
});

Route::prefix('manage')->middleware('AdminAuth')->group(function(){
    Route::post('highsea/index',[HighseaController::class,'index']);
    Route::post('highsea/detail',[HighseaController::class,'detail']);
    Route::post('highsea/del',[HighseaController::class,'del']);
    Route::post('highsea/apply',[HighseaController::class,'apply']);
    Route::post('highsea/admin',[HighseaController::class,'admin']);
    Route::post('highsea/allot',[HighseaController::class,'allot']);

    Route::post('privatesea/index',[PrivateseaController::class,'index']);
    Route::post('privatesea/detail',[PrivateseaController::class,'detail']);
    Route::post('privatesea/recovery',[PrivateseaController::class,'recovery']);
    Route::post('privatesea/del',[PrivateseaController::class,'del']);
    Route::post('privatesea/edit',[PrivateseaController::class,'edit']);
});

Route::prefix('controller')->middleware('AdminAuth')->group(function(){
    Route::post('total',[Controller::class,'total']);
    Route::post('business',[Controller::class,'business']);
    Route::post('source',[Controller::class,'source']);
});
